<? 
require_once '../includes/funciones.php';
include ("seguridad.php");
conexion();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title><?php titulopanel();?></title>
<link rel="STYLESHEET" type="text/css" href="estilo.css">

<script type="text/javascript" src="../plugins/jquery.js"></script>
<script type="text/javascript" src="../plugins/jquery_validate/jquery.validate.js"></script>
<script type="text/javascript" src="../plugins/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>

<link type="text/css" href="../plugins/jquery_ui/css/redmond/jquery-ui-1.8.13.custom.css" rel="Stylesheet" />   
<script type="text/javascript" src="../plugins/jquery_ui/js/jquery-ui-1.8.13.custom.min.js"></script> 

<script type="text/javascript">
tinyMCE.init({
    mode : 'exact',
    theme : 'advanced',
	elements: 'title, description, date',
    theme_advanced_buttons1 : 'bold,italic,underline,undo,redo',
    theme_advanced_buttons2 : '',
    theme_advanced_buttons3 : '',
    theme_advanced_toolbar_location : 'top',
    theme_advanced_toolbar_align : 'left',    
    init_instance_callback : "initialiseInstance"
});

$(document).ready(function() {
$("input[type='submit']").click(function() {
tinyMCE.triggerSave();
})


})
</script>

<!-- Errores jaquery -->


<script>
  $(document).ready(function(){
        $("#date").datepicker();
        
	$("#form").validate({
		rules: {			
			date: {
				required: true,
					},
			title: {
				required: true,
				},
			description: {
				required: true
				}	
		},		
		                
		messages: {

            date:{
                required: "Seleccione una fecha"
                 },    
            title:{
                required:"Coloque un titulo"        
                  },        
            description: "Coloque una descripcion"		
                  }
	});
	
  });

</script>
<!-- /ERRORES -->

</head>
    
    <body>


<div id="contenedor">

    <div id="encabezado"><?php include('header.php') ?></div><!--fin de encabezado-->

    <div id="menuizquierda"><?php include('menu.php') ?></div><!--fin de menuizquierda-->
    
    <div id="content">			
        <div id="formulario">
            <br>
            <span class="title">Cargar Evento</span>
            <br>
            <form class ="admin" id="form" name="form" action="control_eventos.php" method="post" enctype="multipart/form-data">
            <br>
            <fieldset class="admin">			
                <legend>Evento</legend>
		<p><span>Publicar:</span>
                    <input type="checkbox" name="published" value="1" checked />
		</p>
		<br>
		<p><span>Fecha:</span>
                    <input type="text" name="date" id="date"/>
                </p>
		<br><br>
		<p><span>T&iacute;tulo:</span>				
                    <input type="text" name="title" id="title" onkeyup="if (this.value.length == 139) this.disabled = true;" size="70px">
		</p>
		<br><br><br><br/>
		<p><span>Descripci&oacute;n:</span>				
                    <textarea name="description" id="description" cols="60" rows="10" ></textarea>
		</p>
				
            </fieldset> 
                
            <br><br>
            <input name="boton" type="hidden" id="boton" value="1"></input>
            <input name="buttonadmin" id="buttonadmin" type="submit" class="buttonadmin" value="Aceptar">
            <a class="enlacecancelar" href="eventos.php"><input type="button" class="buttoncancelar" value="Cancelar"></a>
            <br><br>
            </form>
            <br>
				
	</div><!-- cierre formulario -->
	<br><br>
    </div><!--fin de content-->

<div id="piepagina"></div> <!--fin de piepagina-->
</div>
</body>
</html>

